import request from '@/utils/request'

// 查询商机跟进记录列表
export function listTrace(query) {
  return request({
    url: '/crm/trace/list',
    method: 'get',
    params: query
  })
}

// 查询商机跟进记录详细
export function getTrace(traceOrderId) {
  return request({
    url: '/crm/trace/' + traceOrderId,
    method: 'get'
  })
}

// 新增商机跟进记录
export function addTrace(data) {
  return request({
    url: '/crm/trace',
    method: 'post',
    data: data
  })
}

// 修改商机跟进记录
export function updateTrace(data) {
  return request({
    url: '/crm/trace',
    method: 'put',
    data: data
  })
}

// 删除商机跟进记录
export function delTrace(traceOrderId) {
  return request({
    url: '/crm/trace/' + traceOrderId,
    method: 'delete'
  })
}

// 获取数据
export function getOrderTraceListNotPage(data) {
  return request({
    url: '/crm/trace/getOrderTraceListNotPage',
    method: 'post',
    data: data
  })
}
